import $http from '@/utils/request.js'

// 请求城市数据
export const CityData = () => {
    return $http({
        url: `?k=2290007`,
        headers:{
            'X-Host': 'mall.film-ticket.city.list'
        }
    })
}

// 请求正在热映数据

export const CurrentlyMovie = (pageNum ,{id , pageSize , type ,k})=>{
    return $http({
        url:`?cityId=${id}&pageNum=${pageNum}&pageSize=${pageSize}&type=${type}&k=${k}`,
        headers:{
            'X-Host':'mall.film-ticket.film.list'
        }
    })
}

// 请求影院数据
export const CinemaDataAPI = ({id})=>{
    return $http({
        url:`?cityId=${id}`,
        headers:{
            'X-Host':'mall.film-ticket.cinema.list',
        }
    })
}
// 请求资讯数据
export const MationDataAPI = ()=>{
    return $http({
        url:`?actId=ElzMZU125260`,
        headers:{
            'X-Host':'mall.act.static-page.info',
        }
    })
}

// 离你最近城市
export const SearchNearestAPI = ({id}) =>{
    return $http({
        url:`?cityId=${id}&k=5124851`,
        headers:{
            'X-Host': 'mall.film-ticket.cinema.recommend'
        }
    })
}

// 详情数据
export const DetailsDataAPI = ({id}) =>{
    return $http({
        url:`?filmId=${id}&k=8948292`,
        headers:{
            'X-Host':'mall.film-ticket.film.info'
        }
    })
}

// 请求影院时间
export const CinemasDataAPI = () =>{
    return $http({
        url:`?filmId=5930&cityId=110100`,
        headers:{
            'X-Host': 'mall.film-ticket.cinema.film-show-cinema'
        }
    })
}


//电影选票
export const CinemaVotesAPI = ({id})=> {
    return $http({
        url:`?cinemaId=${id}&k=7218906`,
        headers:{
            'X-Host':'mall.film-ticket.film.cinema-show-film'
        }
    })
}



export const FilmSelectionAPI = ({id})=> {
    return $http({
        url:`?cinemaId=${id}&k=4566167`,
        headers:{
            'X-Host':'mall.film-ticket.cinema.info'
        }
   })
}

// 电影排期
export const FilmSchedulingAPI = ({id,cinemaId,data})=>{
    return $http({
        url:`?filmId=${id}&cinemaId=${cinemaId}&date=${data}&k=3120477`,
        headers:{
            'X-Host':'mall.film-ticket.schedule.list'
        }
    })
}